
<template>
  <div id="main" class="main">
    <div class="filtrate-box">
      <div class="select-txt">平台</div>
      <el-select class="ks-select" @change="addEventChang" v-model="platform" required placeholder="请选择平台">
        <el-option
            v-for="item in platformList"
            :key="item.value"
            :label="item.label"
            :value="item.value"
        />
      </el-select>
      <div class="select-txt" style="margin-left: 15px">会员身份</div>
      <el-tooltip effect="dark" placement="top">
        <div slot="content" class="tooltips">
          <p>{{memberShipToolTip}}</p>
        </div>
        <el-select class="ks-select" @change='memberShipChange' v-model="filterDimension[1].memberShip" multiple collapse-tags placeholder="请选择会员身份">
          <el-option
              v-for="item in memberShip"
              :key="item.value"
              :label="item.label"
              :value="item.value"
          />
        </el-select>
      </el-tooltip>
      <div class="select-txt" style="margin-left: 15px">会员类型</div>
      <el-tooltip effect="dark" placement="top">
        <div slot="content" class="tooltips">
          <p>{{memberShipInterToolTip}}</p>
        </div>
        <el-select class="ks-select" @change="memberShipInterChange" v-model="filterDimension[2].memberShipInter" multiple collapse-tags placeholder="请选择会员类型">
          <el-option
              v-for="item in memberShipInter"
              :key="item.value"
              :label="item.label"
              :value="item.value"
          />
        </el-select>
      </el-tooltip>
    </div>
    <div class="filtrate-box">
      <el-radio-group v-model="filterDimension[0].businessType" style="margin: 15px 0px 5px 0px;">
        <el-radio-button
            v-for="item in businessType"
            :key="item.value"
            :label="item.value"
            >{{item.label}}</el-radio-button>
      </el-radio-group>
    </div>
<!--    <el-button @click="drawShow" type="text" style="margin-left: 16px;">-->
<!--      <i class="el-icon-plus"></i>-->
<!--      筛选维度-->
<!--    </el-button>-->
<!--    <el-drawer-->
<!--        title="筛选维度"-->
<!--        :visible.sync="drawer"-->
<!--        :direction="direction"-->
<!--        style="margin-top:60px;"-->
<!--    >-->
<!--      <div class="drawerCon">-->
<!--        <div class="drawer">-->
<!--          <p>商品类型</p>-->
<!--          <el-select class="ks-select" @change="addEventChang" v-model="filterDimension[0].businessType" required placeholder="请选择业务类型">-->
<!--            <el-option-->
<!--                v-for="item in businessType"-->
<!--                :key="item.value"-->
<!--                :label="item.label"-->
<!--                :value="item.value"-->
<!--            />-->
<!--          </el-select>-->
<!--          <div class="details-icon"-->
<!--               @mouseenter="enters('businessTypeShow')"-->
<!--               @mouseleave="leaver('businessTypeClose')"-->
<!--          >-->
<!--            <el-tooltip effect="dark" placement="top">-->
<!--              <div slot="content" class="tooltips">-->
<!--                <p>整体：全部商品</p>-->
<!--                <p>故事会员：故事会员卡</p>-->
<!--                <p>听书会员：听书会员卡</p>-->
<!--                <p>故事：儿内商品（专辑、故事、年包、儿内视频专辑、听书单品等）</p>-->
<!--                <p>知识付费：乐读课程（儿教训练营、轻课、视频课等）</p>-->
<!--              </div>-->
<!--              <img class="details-img" src="@/assets/img/details-icon.png" alt="">-->
<!--            </el-tooltip>-->
<!--          </div>-->
<!--          &lt;!&ndash;          <div v-show="isBusinessType" class="details">&ndash;&gt;-->
<!--          &lt;!&ndash;            <p>故事会员：故事会员卡</p>&ndash;&gt;-->
<!--          &lt;!&ndash;            <p>听书会员：听书会员卡</p>&ndash;&gt;-->
<!--          &lt;!&ndash;            <p>故事：儿内故事</p>&ndash;&gt;-->
<!--          &lt;!&ndash;            <p>优品：优品</p>&ndash;&gt;-->
<!--          &lt;!&ndash;            <p>知识付费：乐读课程（儿教训练营、轻课、视频课等）</p>&ndash;&gt;-->
<!--          &lt;!&ndash;          </div>&ndash;&gt;-->
<!--        </div>-->
<!--        &lt;!&ndash;        <div class="drawer">&ndash;&gt;-->
<!--        &lt;!&ndash;          <p>新老用户</p>&ndash;&gt;-->
<!--        &lt;!&ndash;          <el-select class="ks-select" @change="addEventChang" v-model="filterDimension[2].isNewVip" multiple placeholder="请选择新老用户">&ndash;&gt;-->
<!--        &lt;!&ndash;            <el-option&ndash;&gt;-->
<!--        &lt;!&ndash;                v-for="item in isNewVip"&ndash;&gt;-->
<!--        &lt;!&ndash;                :key="item.value"&ndash;&gt;-->
<!--        &lt;!&ndash;                :label="item.label"&ndash;&gt;-->
<!--        &lt;!&ndash;                :value="item.value"&ndash;&gt;-->
<!--        &lt;!&ndash;            />&ndash;&gt;-->
<!--        &lt;!&ndash;          </el-select>&ndash;&gt;-->
<!--        &lt;!&ndash;          <div class="details-icon"&ndash;&gt;-->
<!--        &lt;!&ndash;               @mouseenter="enters('memberShow')"&ndash;&gt;-->
<!--        &lt;!&ndash;               @mouseleave="leaver('memberClose')"&ndash;&gt;-->
<!--        &lt;!&ndash;          >&ndash;&gt;-->
<!--        &lt;!&ndash;            <el-tooltip effect="dark" placement="top">&ndash;&gt;-->
<!--        &lt;!&ndash;              <div slot="content" class="tooltips">&ndash;&gt;-->
<!--        &lt;!&ndash;                  <p>新用户：用户设备激活日期和注册日期均在14日内，且注册日期>=激活日期；用户仅有注册信息，注册日期在14日内</p>&ndash;&gt;-->
<!--        &lt;!&ndash;                  <p>老用户：非新用户</p>&ndash;&gt;-->
<!--        &lt;!&ndash;              </div>&ndash;&gt;-->
<!--        &lt;!&ndash;              <img class="details-img" src="@/assets/img/details-icon.png" alt="">&ndash;&gt;-->
<!--        &lt;!&ndash;            </el-tooltip>&ndash;&gt;-->
<!--        &lt;!&ndash;          </div>&ndash;&gt;-->
<!--        &lt;!&ndash;&lt;!&ndash;          <div v-show="isMember" class="details">&ndash;&gt;&ndash;&gt;-->
<!--        &lt;!&ndash;&lt;!&ndash;            <p>新用户：用户设备激活日期和注册日期均在14日内，且注册日期>=激活日期；用户仅有注册信息，注册日期在14日内</p>&ndash;&gt;&ndash;&gt;-->
<!--        &lt;!&ndash;&lt;!&ndash;            <p>老用户：非新用户</p>&ndash;&gt;&ndash;&gt;-->
<!--        &lt;!&ndash;&lt;!&ndash;          </div>&ndash;&gt;&ndash;&gt;-->
<!--        &lt;!&ndash;        </div>&ndash;&gt;-->
<!--&lt;!&ndash;        <div class="drawer">&ndash;&gt;-->
<!--&lt;!&ndash;          <p>会员身份</p>&ndash;&gt;-->
<!--&lt;!&ndash;          <el-select class="ks-select" @change='memberShipChange' v-model="filterDimension[1].memberShip" multiple collapse-tags placeholder="请选择会员身份">&ndash;&gt;-->
<!--&lt;!&ndash;            <el-option&ndash;&gt;-->
<!--&lt;!&ndash;                v-for="item in memberShip"&ndash;&gt;-->
<!--&lt;!&ndash;                :key="item.value"&ndash;&gt;-->
<!--&lt;!&ndash;                :label="item.label"&ndash;&gt;-->
<!--&lt;!&ndash;                :value="item.value"&ndash;&gt;-->
<!--&lt;!&ndash;            />&ndash;&gt;-->
<!--&lt;!&ndash;          </el-select>&ndash;&gt;-->
<!--&lt;!&ndash;          <div class="details-icon"&ndash;&gt;-->
<!--&lt;!&ndash;               @mouseenter="enters('memberShipShow')"&ndash;&gt;-->
<!--&lt;!&ndash;               @mouseleave="leaver('memberShipClose')"&ndash;&gt;-->
<!--&lt;!&ndash;          >&ndash;&gt;-->
<!--&lt;!&ndash;            <el-tooltip effect="dark" placement="top">&ndash;&gt;-->
<!--&lt;!&ndash;              <div slot="content" class="tooltips">&ndash;&gt;-->
<!--&lt;!&ndash;                <p>双重会员：即是故事会员又是听书会员</p>&ndash;&gt;-->
<!--&lt;!&ndash;                <p>故事会员：仅为故事会员</p>&ndash;&gt;-->
<!--&lt;!&ndash;                <p>听书会员：仅为听书会员</p>&ndash;&gt;-->
<!--&lt;!&ndash;                <p>体验卡会员：仅为体验卡会员</p>&ndash;&gt;-->
<!--&lt;!&ndash;                <p>非会员：仅为非会员</p>&ndash;&gt;-->
<!--&lt;!&ndash;              </div>&ndash;&gt;-->
<!--&lt;!&ndash;              <img class="details-img" src="@/assets/img/details-icon.png" alt="">&ndash;&gt;-->
<!--&lt;!&ndash;            </el-tooltip>&ndash;&gt;-->
<!--&lt;!&ndash;          </div>&ndash;&gt;-->
<!--&lt;!&ndash;          &lt;!&ndash;          <div v-show="isMemberShip" class="details">&ndash;&gt;&ndash;&gt;-->
<!--&lt;!&ndash;          &lt;!&ndash;            <p>故事会员：仅为故事会员</p>&ndash;&gt;&ndash;&gt;-->
<!--&lt;!&ndash;          &lt;!&ndash;            <p>听书会员：仅为听书会员</p>&ndash;&gt;&ndash;&gt;-->
<!--&lt;!&ndash;          &lt;!&ndash;            <p>故事和听书会员：即是故事会员又是听书会员</p>&ndash;&gt;&ndash;&gt;-->
<!--&lt;!&ndash;          &lt;!&ndash;            <p>体验卡会员：仅为体验卡会员</p>&ndash;&gt;&ndash;&gt;-->
<!--&lt;!&ndash;          &lt;!&ndash;            <p>非会员：仅为非会员</p>&ndash;&gt;&ndash;&gt;-->
<!--&lt;!&ndash;          &lt;!&ndash;          </div>&ndash;&gt;&ndash;&gt;-->
<!--&lt;!&ndash;        </div>&ndash;&gt;-->
<!--&lt;!&ndash;        <div class="drawer">&ndash;&gt;-->
<!--&lt;!&ndash;          <p>会员权益</p>&ndash;&gt;-->
<!--&lt;!&ndash;          <el-select class="ks-select" @change="memberShipInterChange" v-model="filterDimension[2].memberShipInter" multiple collapse-tags placeholder="请选择会员类型">&ndash;&gt;-->
<!--&lt;!&ndash;            <el-option&ndash;&gt;-->
<!--&lt;!&ndash;                v-for="item in memberShipInter"&ndash;&gt;-->
<!--&lt;!&ndash;                :key="item.value"&ndash;&gt;-->
<!--&lt;!&ndash;                :label="item.label"&ndash;&gt;-->
<!--&lt;!&ndash;                :value="item.value"&ndash;&gt;-->
<!--&lt;!&ndash;            />&ndash;&gt;-->
<!--&lt;!&ndash;          </el-select>&ndash;&gt;-->
<!--&lt;!&ndash;          <div class="details-icon"&ndash;&gt;-->
<!--&lt;!&ndash;               @mouseenter="enters('memberShipInterShow')"&ndash;&gt;-->
<!--&lt;!&ndash;               @mouseleave="leaver('memberShipInterClose')"&ndash;&gt;-->
<!--&lt;!&ndash;          >&ndash;&gt;-->
<!--&lt;!&ndash;            <el-tooltip effect="dark" placement="top">&ndash;&gt;-->
<!--&lt;!&ndash;              <div slot="content" class="tooltips">&ndash;&gt;-->
<!--&lt;!&ndash;                <p>年卡：享受年卡权益</p>&ndash;&gt;-->
<!--&lt;!&ndash;                <p>连续包月：享受连续包月权益</p>&ndash;&gt;-->
<!--&lt;!&ndash;                <p>月卡：享受月卡权益</p>&ndash;&gt;-->
<!--&lt;!&ndash;                <p>季卡：享受季卡权益</p>&ndash;&gt;-->
<!--&lt;!&ndash;                <p>半年卡：享受半年卡权益</p>&ndash;&gt;-->
<!--&lt;!&ndash;                <p>体验卡：享受体验卡权益</p>&ndash;&gt;-->
<!--&lt;!&ndash;              </div>&ndash;&gt;-->
<!--&lt;!&ndash;              <img class="details-img" src="@/assets/img/details-icon.png" alt="">&ndash;&gt;-->
<!--&lt;!&ndash;            </el-tooltip>&ndash;&gt;-->
<!--&lt;!&ndash;          </div>&ndash;&gt;-->
<!--&lt;!&ndash;          &lt;!&ndash;          <div v-show="isMemberShipInter" class="details">&ndash;&gt;&ndash;&gt;-->
<!--&lt;!&ndash;          &lt;!&ndash;            <p>年卡：享受年卡权益</p>&ndash;&gt;&ndash;&gt;-->
<!--&lt;!&ndash;          &lt;!&ndash;            <p>连续包月：享受连续包月权益</p>&ndash;&gt;&ndash;&gt;-->
<!--&lt;!&ndash;          &lt;!&ndash;            <p>月卡：享受月卡权益</p>&ndash;&gt;&ndash;&gt;-->
<!--&lt;!&ndash;          &lt;!&ndash;            <p>季卡：享受季卡权益</p>&ndash;&gt;&ndash;&gt;-->
<!--&lt;!&ndash;          &lt;!&ndash;            <p>双年卡：享受双年卡权益</p>&ndash;&gt;&ndash;&gt;-->
<!--&lt;!&ndash;          &lt;!&ndash;            <p>体验卡：享受体验卡权益</p>&ndash;&gt;&ndash;&gt;-->
<!--&lt;!&ndash;          &lt;!&ndash;          </div>&ndash;&gt;&ndash;&gt;-->
<!--&lt;!&ndash;        </div>&ndash;&gt;-->
<!--&lt;!&ndash;        <span slot="footer" class="dialog-footer">&ndash;&gt;-->
<!--&lt;!&ndash;&lt;!&ndash;            <el-button @click="dialogVisible = false">取 消</el-button>&ndash;&gt;&ndash;&gt;-->
<!--&lt;!&ndash;            <el-button style="width: 245px;" type="primary" @click="confirmChecked">确 定</el-button>&ndash;&gt;-->
<!--&lt;!&ndash;        </span>&ndash;&gt;-->
<!--      </div>-->
<!--    </el-drawer>-->
  </div>
</template>
<script>

import {getBusinessType, getPlatform, getMemberShipInterList, isLogin, getMemberShipList} from "@/assets/js/api"

export default {
  name: 'filtrate',
  components: {},
  data () {
    return {
      tabPosition: '',
      businessTypeALLId: ['0','1','2','3','5'],
      memberShipAllId: [],
      oldMemberShipValArray: ['全部','0','1','2','3','4'],
      memberShipToolTip: '双重会员,故事会员,听书会员,体验卡会员,非会员',
      memberShipInterAllId: [],
      oldMemberShipInterValArray: ['全部','6','1','2','3','4','5'],
      memberShipInterToolTip: '年卡,月卡,体验卡,连续包月,季卡,半年卡',
      isMember: false,
      isBusinessType: false,
      isMemberShip: false,
      isMemberShipInter: false,
      drawer: false,
      direction: 'rtl',
      directionArr:["会员身份","新老用户","地域"],
      isNewVip:[
        {
          label: "新用户",
          value: "0"
        },
        {
          label: "老用户",
          value: "1"
        }
      ],               //新老用户列表
      businessType:'',           //商品类型列表
      memberShip:[],
      memberShipInter: [],              //会员类型权益列表
      province:[],               //下单地区列表
      platformList:[],           //平台列表
      platform: "0",              //平台
      filterDimension:[
        {
          businessType: '0'   //商品类型
        },
        {
          memberShip:['全部','0','1','2','3','4']     //会员身份
        },
        // {
        //   isNewVip:['0','1']       //新老用户
        // },
        {
          memberShipInter: ['全部','6','1','2','3','4','5']        //会员权益
        }
      ]
    }
  },
  computed: {

  },
  created () {
    // this.checkLogin()
    this.$nextTick(() =>{
      this.getData()
    })
  },
  mounted () {
  },
  methods: {
    drawShow(){
      this.drawer = true
      console.log(this.filterDimension[0].businessType)
      let type = typeof (this.filterDimension[0].businessType)
      console.log(type)
      if(type === 'object'){
        this.filterDimension[0].businessType = this.filterDimension[0].businessType[0]
      }
    },
    // 确认选择
    confirmChecked(){
      this.drawer = false
    },
    enters(e){
      switch(e) {
        case 'memberShow':
          this.isMember = true
          break;
        case 'businessTypeShow':
          this.isBusinessType = true
          break;
        case 'memberShipShow':
          this.isMemberShip = true
          break;
        case 'memberShipInterShow':
          this.isMemberShipInter = true
          break;
        default:
          this.isMember = false
          this.isBusinessType = false
          this.isMemberShip = false
          this.isMemberShipInter = false
      }

    },
    leaver(e){
      switch(e) {
        case 'memberClose':
          this.isMember = false
          break;
        case 'businessTypeClose':
          this.isBusinessType = false
          break;
        case 'memberShipClose':
          this.isMemberShip = false
          break;
        case 'memberShipInterClose':
          this.isMemberShipInter = false
          break;
        default:
          this.isMember = false
          this.isBusinessType = false
          this.isMemberShip = false
          this.isMemberShipInter = false
      }
    },
    checkLogin(){
      isLogin()
          .then((res) => {
            console.log(res)
            if (res.code === 0) {
              this.$nextTick(() =>{
                this.getData()
              })
            }else{
                this.login();
            }
          })
          .catch(() => {
            this.login();
          });
    },
    login() {
      let url =
          "/ks-data-bussiness-api/ks-data-bussiness-api/login?referUrl=" + window.location.href;
      window.location.href = url;
    },
    //会员身份添加全选
    memberShipChange(val){
      console.log(val)
      const oldVal = this.oldMemberShipValArray;//记录上次选中的数据，
      //判断当前选中的值中是否有ALL
      let valIncludeAll = val.includes('全部');
      console.log(valIncludeAll)
      //判断上次选中的值中是否含有ALL
      let oldValIncludeAll = oldVal.includes('全部');
      console.log(oldValIncludeAll)
      //如果选中的当前值里包含ALL则全部选中
      if (valIncludeAll) {
        this.filterDimension[1].memberShip=this.memberShipAllId
      }
      //如果旧值中包含ALL，当前值不包含ALL，则表示全部未选中
      if (oldValIncludeAll && !valIncludeAll) {
        console.log('触发了')
        this.filterDimension[1].memberShip=[];
      }
      //如果新旧值中都包含ALL，则表示全部选中但是要除去ALL和当前点击的选项（val中已自动去除）
      if (oldValIncludeAll && valIncludeAll) {
        val.forEach((item, index) => {
          if (item == '全部') {
            val.splice(index, 1);
          }
        });
        this.filterDimension[1].memberShip = val;
      }
      //如果新旧值中都不包含ALL但是其他选项均已选中则表示全选
      if (!oldValIncludeAll && !valIncludeAll) {
        if (val.length === this.memberShipAllId.length - 1) {
          this.filterDimension[1].memberShip=this.memberShipAllId;
        } else {
          console.log('触发了11111')
          this.filterDimension[1].memberShip=val
        }
      }
      this.oldMemberShipValArray=this.filterDimension[1].memberShip;//更新选中的老数据
      console.log(this.oldMemberShipValArray)
      let str = []
      for(let i=0; i<this.oldMemberShipValArray.length; i++){
        for(let j=0; j<this.memberShip.length; j++){
          if(this.oldMemberShipValArray[i] === this.memberShip[j].value){
            str.push(this.memberShip[j].label)
          }
        }
      }
      str.shift()
      this.memberShipToolTip = str.join(',')
      console.log(this.memberShipToolTip)
    },
    //会员权益添加全选
    memberShipInterChange(val){
      console.log(val)
      const oldVal = this.oldMemberShipInterValArray;//记录上次选中的数据，
      //判断当前选中的值中是否有ALL
      let valIncludeAll = val.includes('全部');
      console.log(valIncludeAll)
      //判断上次选中的值中是否含有ALL
      let oldValIncludeAll = oldVal.includes('全部');
      console.log(oldValIncludeAll)
      //如果选中的当前值里包含ALL则全部选中
      if (valIncludeAll) {
        this.filterDimension[2].memberShipInter=this.memberShipInterAllId
      }
      //如果旧值中包含ALL，当前值不包含ALL，则表示全部未选中
      if (oldValIncludeAll && !valIncludeAll) {
        console.log('触发了')
        this.filterDimension[2].memberShipInter=[];
      }
      //如果新旧值中都包含ALL，则表示全部选中但是要除去ALL和当前点击的选项（val中已自动去除）
      if (oldValIncludeAll && valIncludeAll) {
        val.forEach((item, index) => {
          if (item == '全部') {
            val.splice(index, 1);
          }
        });
        this.filterDimension[2].memberShipInter = val;
      }
      //如果新旧值中都不包含ALL但是其他选项均已选中则表示全选
      if (!oldValIncludeAll && !valIncludeAll) {
        if (val.length === this.memberShipAllId.length - 1) {
          this.filterDimension[2].memberShipInter=this.memberShipInterAllId;
        } else {
          console.log('触发了11111')
          this.filterDimension[2].memberShipInter=val
        }
      }
      this.oldMemberShipInterValArray=this.filterDimension[2].memberShipInter;//更新选中的老数据
      console.log(this.oldMemberShipInterValArray)
      let str = []
      for(let i=0; i<this.oldMemberShipInterValArray.length; i++){
        for(let j=0; j<this.memberShipInter.length; j++){
          if(this.oldMemberShipInterValArray[i] === this.memberShipInter[j].value){
            str.push(this.memberShipInter[j].label)
          }
        }
      }
      str.shift()
      this.memberShipInterToolTip = str.join(',')
      console.log(this.memberShipInterToolTip)
    },
    getData(){
      // 获取业务类型列表
      getBusinessType()
          .then((res)=>{
            console.log(res)
            this.businessType = res.map((item) => {
              return {
                label: item.businessTypeName,
                value: item.id.toString()
              }
            })
            // this.businessType = [
            //   {
            //     label: '测试数据',
            //     value: '0'
            //   },
            //   {
            //     label: '测试数据',
            //     value: '1'
            //   },
            //   {
            //     label: '测试数据',
            //     value: '2'
            //   },
            //   {
            //     label: '测试数据',
            //     value: '3'
            //   },
            //   {
            //     label: '测试数据',
            //     value: '4'
            //   },
            //   {
            //     label: '测试数据',
            //     value: '5'
            //   },
            //   {
            //     label: '测试数据',
            //     value: '6'
            //   },
            //   {
            //     label: '测试数据',
            //     value: '7'
            //   },
            //   {
            //     label: '测试数据',
            //     value: '8'
            //   },
            //   {
            //     label: '测试数据',
            //     value: '9'
            //   },
            //   {
            //     label: '测试数据',
            //     value: '10'
            //   },
            //   {
            //     label: '测试数据',
            //     value: '11'
            //   },
            //   {
            //     label: '测试数据',
            //     value: '12'
            //   },
            //   {
            //     label: '测试数据',
            //     value: '13'
            //   },
            //   {
            //     label: '测试数据',
            //     value: '14'
            //   },
            //   {
            //     label: '测试数据',
            //     value: '15'
            //   }
            // ]
            this.businessTypeALLId = res.map((item) => {
              return item.id.toString()
            })
            console.log(this.businessTypeALLId)
            this.filterDimension[0].businessType = '0'
          })

      // 获取平台列表
      getPlatform(this.params)
          .then((data)=>{
            console.log(data)
            this.platformList = data.map((item) => {
              return {
                label: item.platform,
                value: item.id.toString()
              }
            })
          })

      // 获取会员身份列表
      getMemberShipList(this.params)
          .then((data)=>{
            console.log(data)
            data.unshift({
              memberShipName: '全部',
              id: '全部'
            })
            this.memberShip = data.map((item) => {
              return {
                label: item.memberShipName,
                value: item.id.toString()
              }
            })
            this.memberShipAllId = data.map((item) => {
              return item.id.toString()
            })
            this.filterDimension[1].memberShip = data.map((item) => {
              return item.id.toString()
            })
          })

      // 获取会员权益列表
      getMemberShipInterList(this.params)
          .then((data)=>{
            console.log(data)
            data.unshift({
              memberShipInterName: '全部',
              id: '全部'
            })
            this.memberShipInter = data.map((item) => {
              return {
                label: item.memberShipInterName,
                value: item.id.toString()
              }
            })
            this.memberShipInterAllId = data.map((item) => {
              return item.id.toString()
            })

            this.filterDimension[2].memberShipInter = data.map((item) => {
              return item.id.toString()
            })
          })

      this.$emit("filterDimension",this.filterDimension)
      this.$emit("platform",this.platform)
      this.$emit("businessTypeALLId",this.businessTypeALLId)
    },
    addEventChang(){
      console.log(this.filterDimension)
      this.$emit("filterDimension",this.filterDimension)
      this.$emit("platform",this.platform)
      this.$emit("businessTypeALLId",this.businessTypeALLId)
    }
  }
}
</script>
<style lang="scss" scoped>
.filtrate-box{
  width: 100%;
  overflow: hidden;
}
.select-txt{
  float: left;
  overflow: hidden;
  line-height: 48px;
}
.ks-select {
  float: left;
  margin-left: 10px;
  margin-bottom: 5px;
  margin-top: 5px;
}
.details-icon{
  width: 18px;
  height: 18px;
  position: absolute;
  //background-color: green;
  top: 1.5px;
  left: 60px;
}
.details-img{
  position: absolute;
  width: 100%!important;
  height: 100%!important;
  top: 0;
  left: 0;
}
.details{
  width: 240px;
  overflow: hidden;
  position: absolute;
  background-color: rgba(0, 0, 0, 0.75);
  top: 2px;
  left: 88px;
  font-size: 15px;
  color: #FFFFFF;
  line-height: 20px;
  padding: 10px;
  box-sizing: border-box;
  z-index: 9;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgb(0 0 0 / 15%);
}
.tooltips{
  font-size: 15px;
  line-height: 20px;
}
.direction {
  width:200px;
  height:32px;
  line-height: 32px;
  text-indent: 10px;
  font-size: 14px;
  border:1px solid #DCDFE6;
  color:#606266
}
.drawerCon {
  padding: 20px;
  .ks-select {
    margin-left: 20px;
    margin-bottom: 5px;
    margin-top: 5px;
  }
}
.drawer{
  position: relative;
}
.main{
  margin-top: 8px;
}
.dialog-footer{
  position: fixed;
  bottom: 10px;
  right: 10px;
}
</style>
